package ro.myApp.esb.service;

import javax.ejb.Local;
import javax.ejb.Stateless;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;

import org.mule.api.MuleMessage;
import org.mule.api.MuleSession;
import org.mule.api.routing.RoutingException;

@Stateless
@Local(EsbTransactionalRouter.class)
public class EsbTransactionalRouterImpl implements EsbTransactionalRouter{

	@Override
	@TransactionAttribute(TransactionAttributeType.REQUIRED)
	public MuleMessage route(TransactionalChainingRouter router, MuleMessage message,
			MuleSession session) throws RoutingException  {
		return router.routeDefault(message, session);
	}

}
